package edu.hunan.cxb18.dao.Impl;

import edu.hunan.cxb18.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author chenheng
 * @create 2020-03-26 8:20
 */
@Repository
public class BookDaoImpl implements BookDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Override
    public double queryByIsban(String isban) {
        Object[] args = {isban};
        return jdbcTemplate.queryForObject("select price from t_book where isbn= ?",args,Double.class);
    }
}
